<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Editor</title>
    <style type="text/css" media="screen">

    </style>
    <link rel="stylesheet" href="{$Think.const.ADMIN_BOOT_URL}css/bootstrap.min.css">
</head>
<body>

<pre id="editor"></pre>

<div style="text-align: center">
<button type="button" class="btn btn-info" onclick="">确认</button>
<button type="button" class="btn btn-warning">取消</button>
</div>

<script src="{$Think.const.ACE_URL}demo/kitchen-sink/require.js"></script>
<script src="{$Think.const.SITE_PATH}Public/jquery/jquery.min.js"></script>
<script src="{$Think.const.ADMIN_BOOT_URL}js/bootstrap.min.js"></script>
<script>
    // setup paths
    require.config({paths: { "ace" : "{$Think.const.ACE_URL}/lib/ace"}});
    // load ace and extensions
    require(["../../../../ace/ace"], function(ace) {
        var editor = ace.edit("editor");
        editor.setTheme("ace/theme/monokai");//设置风格
        editor.session.setMode("ace/mode/php");//设置语言类型
        editor.setAutoScrollEditorIntoView(true);//滚动
        editor.setOption("minLines", 25);
        editor.setOption("maxLines", 45);
    });

</script>

<script src="{$Think.const.ACE_URL}demo/show_own_source.js"></script>

</body>
</html>
